import React from 'react';
import { HashRouter as Router, Link, Route,Redirect } from 'react-router-dom';

import Home from './pages/home'

/* 
1 当用户输入  "/"  和 "/home"  都希望 它能显示  "/home/index" 所对应的页面
2 重定向 嵌套也必须要实现!! 
  1 先实现 让 "/"  => "/home"
  2 先实现 让 "/"  => "/home/index"
 */
function App() {
  return (
    <div>
      <Router>
        <Route path="/home" component={Home} />
        <Redirect path="/" to="/home/index"/>
      </Router>
    </div>
  );
}

export default App;

